package outline;



import java.awt.BorderLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
public class J14_BoderLayout extends JFrame{
	public J14_BoderLayout(){
		setDefaultLookAndFeelDecorated(true);
		setTitle("BorderLayout - 5개 구역에  나눠 배치");
		setLayout(new BorderLayout(7,7));
		setBounds(300,300,450,300);
		
		JButton btn1 = new JButton("버튼 1");
		add(btn1, BorderLayout.NORTH);
		JButton btn2 = new JButton("버튼 2");
		add(btn2, BorderLayout.EAST);
		JButton btn3 = new JButton("버튼 3");
		add(btn3, BorderLayout.WEST);
		JButton btn4 = new JButton("버튼 4");
		add(btn4,BorderLayout.SOUTH);
		JPanel btn5 = new JPanel();
		add(btn5,BorderLayout.CENTER);
		for(int i = 1; i <= 5; ++i){
		JButton btn6 = new JButton("버튼 6");
		btn5.add(btn6,BorderLayout.CENTER);
		}
		/*JButton btn7 = new JButton("버튼 6");
		btn5.add(btn7,BorderLayout.CENTER);
		JButton btn8 = new JButton("버튼 6");
		btn5.add(btn8,BorderLayout.CENTER);
		JButton btn9 = new JButton("버튼 6");
		btn5.add(btn9,BorderLayout.CENTER);
		JButton btn10 = new JButton("버튼 6");
		btn5.add(btn10,BorderLayout.CENTER);
		*/
		
		setVisible(true);
		
		
	}

	
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			
			@Override
			public void run() {
				new J14_BoderLayout();
				
			}
		});
		

	}

}
